package com.sjq.demo;

import com.alibaba.fastjson.JSONObject;
import com.sjq.demo.entity.TestGz;
import com.sjq.demo.entity.TestUser;
import com.sjq.demo.service.LoginService;
import com.sjq.demo.service.TestGzService;
import com.sjq.demo.service.TestUserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@RunWith(SpringRunner.class)
public class test {

    @Autowired
    TestUserService testUserService;
    @Autowired
    TestGzService testGzService;
    @Autowired
    LoginService loginService;

    @Test
    public void test(){
//        TestUser testUser = TestUser.builder()
//                .id(12456)
//                .age(19)
//                .job("学生")
//                .name("小红")
//                .sex("男")
//                .address("南京市").build();
//        testUserService.addUser(testUser);
//        int a = 2/0;
//        testGzService.addGz(12456);
//        testGzService.test();
        loginService.login("zhangsan","123456");
    }

}
